package com.spvs.job.domain;

import lombok.Getter;

/**
 * 终端类型 同步字典表
 */
@Getter
public enum CommonEnum {
    YOU_XIAO(0,"有效"),
    SHI_XIAO(1,"失效");


    CommonEnum(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }
    private Integer code;
    private String desc;

    public static String getDescByCode(Integer code){
        for (CommonEnum value : CommonEnum.values()) {
            if (value.code.equals(code)){
                return value.desc;
            }
        }
        return null;
    }
}
